<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('【留言】列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <input th:type="hidden" th:value="${session.name}" name="xingming">
                    <input th:type="hidden" th:value="${session.phone}" name="shoujihao">
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" href="/system/yuyue/liuyan">
                    <i class="fa fa-plus"></i> 留言
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:liuyan:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:liuyan:remove')}]];
        var prefix = ctx + "system/liuyan";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "【留言】",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'liuyanid',
                    title: '留言ID',
                    visible: false
                },
                {
                    field: 'neirong',
                    title: '留言内容'
                },
                {
                    field: 'xingming',
                    title: '姓名'
                },
                {
                    field: 'shoujihao',
                    title: '手机号'
                },
                /*{
                    field: 'status',
                    title: '状态'
                },
                {
                    field: 'text1',
                    title: '状态'
                },
                {
                    field: 'text2',
                    title: '状态'
                },
                {
                    field: 'text3',
                    title: '状态'
                },
                {
                    field: 'text4',
                    title: '状态'
                },
                {
                    field: 'text5',
                    title: '状态'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.liuyanid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.liuyanid + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>